<title>海豚护理API接口</title>

    
{include file="common/header" /}
<script src="ace/layer/layer.js"></script>
<script src="ace/md5.js"></script>
	<style type="text/css">
		.sinput{width: 100px;}
		.masklike{width: 2.3rem;}
		.medalhad{width: 2.3rem;}
		table tr td:first-child{width: 10%;}
		table tr td:nth-child(2){width: 10%;}
		textarea{width: 100%;}
	</style>
    <!-- 顶部区域 -->
    <div class="main-container" id="main-container">
        <!-- 头部导航 -->
        <div class="main-content">
            <div class="main-content-inner">
                <div class="page-content">
                		<div class="table-header"> 海豚护理平台API接口 </div>
                		<div class="row">
									<div class="col-sm-12">
										<h3 class="header blue lighter smaller">
											<i class="ace-icon fa fa-folder-o smaller-90"></i>
											API内容
										</h3>
										<div class="row">
											<h5 class="col-sm-1 control-label no-padding-right  blue lighter smaller" for="form-field-1">自动生成url</h5>
											<div class="col-sm-3">
												<input type="text" value="http://{$Think.server.HTTP_HOST}/dnursetp/index.php" id="website" placeholder="host" class="col-xs-12 ">
												
											</div>
											<div class="col-sm-8">
												<input type="text" value="<?php echo $signStr;?>" id="signStr" placeholder="签名参数" class="col-xs-12 ">
											</div>
										</div>
										<hr>
										<div class="row">
											<div class="col-sm-1">
											</div>
											<div class="col-sm-11">
												<span id="tokenLabel">token: ,memberid:</span>
												<input id="inputToken" type="hidden" />
												<input id="inputMemberId" type="hidden" />
											</div>
										</div>
										<hr>
										<!-- #section:elements.tab -->
										<div class="tabbable">
											<ul class="nav nav-tabs" id="myTab">
												<li class="active">
													<a data-toggle="tab" href="#section1">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														会员接口
													</a>
												</li>

												<li>
													<a data-toggle="tab" href="#section2">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														活动专题
													</a>
												</li>

												<li>
													<a data-toggle="tab" href="#section3">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														社区接口
													</a>
												</li>
												<li>
													<a data-toggle="tab" href="#section4">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														护理接口
													</a>
												</li>
												<li>
													<a data-toggle="tab" href="#section5">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														消息接口
													</a>
												</li>
												<li>
													<a data-toggle="tab" href="#section6">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														文件接口
													</a>
												</li>
												<li>
													<a data-toggle="tab" href="#section7">
														<i class="green ace-icon fa fa-bug bigger-120"></i>
														数据库关系图
													</a>
												</li>
											</ul>

											<div class="tab-content">
												<div id="section1" class="tab-pane fade in active">
													<div class="row">
														<div class="col-sm-12">
															<div class="accordion accordion-style2">

<div class="group">
	<h3 class="accordion-header">得到openid</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/wechart/jscode2session</span></td>
					</tr>
					<tr>
						<td>code</td>
						<td><input name="code"  /></td>
						<td>jscode</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":{微信对象}","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,msg:"错误信息",code:错误代码}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">会员登录获取token</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/login</span></td>
					</tr>
					<tr>
						<td>account</td>
						<td><input name="account"  /></td>
						<td>账号或者手机</td>
					</tr>
					<tr>
						<td>password</td>
						<td><input class="userpassword" name="password" /></td>
						<td>密码</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":{会员对象json}","userToken":{"token":"令牌","expireTime":过期时间,"memberId":"会员ID"},"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,msg:"错误信息",code:错误代码}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">短信发送验证码</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/sendCheckMessage</span></td>
					</tr>
					<tr>
						<td>phone</td>
						<td><input name="phone"  /></td>
						<td>手机</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":手机,"code":200,"msg":"发送短信成功"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,msg:"短信发送失败",content:"",code:错误代码}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>
		
<div class="group">
	<h3 class="accordion-header">会员注册</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/register</span></td>
					</tr>
					<tr>
						<td>phone *</td>
						<td><input name="phone"  /></td>
						<td>手机</td>
					</tr>
					<tr>
						<td>checkCode  *</td>
						<td><input name="checkCode"  /></td>
						<td>验证码</td>
					</tr>
					<tr>
						<td>password  *</td>
						<td><input class="userpassword" name="password"  /></td>
						<td>密码</td>
					</tr>
					
					<tr>
						<td>openid</td>
						<td><input name="openid"  /></td>
						<td>openid</td>
					</tr>
					<tr>
						<td>nickName</td>
						<td><input name="nickName"  /></td>
						<td>昵称</td>
					</tr>
					<tr>
						<td>realName</td>
						<td><input name="realName"  /></td>
						<td>真实姓名</td>
					</tr>
					<tr>
						<td>sex</td>
						<td><input name="sex"  /></td>
						<td>性别(1：男 2：女)</td>
					</tr>
					<tr>
						<td>avatar</td>
						<td><input name="avatar"  /></td>
						<td>头像</td>
					</tr>
					<tr>
						<td>province</td>
						<td><input name="province"  /></td>
						<td>省份(int型)</td>
					</tr>
					<tr>
						<td>city</td>
						<td><input name="city"  /></td>
						<td>城市(int型)</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":会员json,"code":200,"msg":"发送短信成功"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1012,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>			


<div class="group">
	<h3 class="accordion-header">绑定会员</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/bind</span></td>
					</tr>
					<tr>
						<td>openid</td>
						<td><input name="openid"  /></td>
						<td>openid</td>
					</tr>
					<tr>
						<td>phone</td>
						<td><input name="phone"  /></td>
						<td>手机</td>
					</tr>
					<tr>
						<td>checkCode</td>
						<td><input name="checkCode"  /></td>
						<td>验证码</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":会员json,"code":200,"msg":"发送短信成功"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1012,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>	

<div class="group">
	<h3 class="accordion-header">通过ID获取会员详情</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/getMemberByID</span></td>
					</tr>
					<tr>
						<td>toMemberId</td>
						<td><input name="toMemberId"  /></td>
						<td>会员ID</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":会员json,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>		
<div class="group">
	<h3 class="accordion-header">通过openid获取会员详情</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/getMemberByOpenid</span></td>
					</tr>
					<tr>
						<td>openid</td>
						<td><input name="openid"  /></td>
						<td>openid</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":会员json,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>		
<div class="group">
	<h3 class="accordion-header">更新会员信息</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/updateMember</span></td>
					</tr>
					<tr>
						<td>toMemberId</td>
						<td><input name="toMemberId"  /></td>
						<td>会员ID</td>
					</tr>
					<tr>
						<td>realName</td>
						<td><input name="realName"  /></td>
						<td>真实姓名</td>
					</tr>
					<tr>
						<td>province</td>
						<td><input name="province"  /></td>
						<td>省份</td>
					</tr>
					<tr>
						<td>city</td>
						<td><input name="city"  /></td>
						<td>城市</td>
					</tr>
					<tr>
						<td>age</td>
						<td><input name="age"  /></td>
						<td>年龄</td>
					</tr>
					<tr>
						<td>sex</td>
						<td><input name="sex"  /></td>
						<td>性别(1:男，2:女)</td>
					</tr>
					<tr>
						<td>birthday</td>
						<td><input name="birthday"  /></td>
						<td>生日(yyyy-MM-dd)</td>
					</tr>
					<tr>
						<td>email</td>
						<td><input name="email"  /></td>
						<td>会员邮箱</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":会员json,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>	
	
	
<div class="group">
	<h3 class="accordion-header">(我)关注一个用户</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/noticer</span></td>
					</tr>
					<tr>
						<td>noticerId</td>
						<td><input name="noticerId"  /></td>
						<td>要关注的用户ID</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>
	
	
<div class="group">
	<h3 class="accordion-header">得到某个用户所有的关注者</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/getNoticer</span></td>
					</tr>
					<tr>
						<td>toMemberId</td>
						<td><input name="toMemberId"  /></td>
						<td>要查询的用户ID</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":关注者列表json,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>
	
<div class="group">
	<h3 class="accordion-header">删除我关注的一个人</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/deleteNoticer</span></td>
					</tr>
					<tr>
						<td>deleteMemberId</td>
						<td><input name="deleteMemberId"  /></td>
						<td>要删除的用户ID</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>


<div class="group">
	<h3 class="accordion-header">得到我的粉丝列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/myFollws</span></td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":粉丝列表json,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>	
			
<!--<div class="group">
	<h3 class="accordion-header">删除粉丝</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/member/deleteFollow</span></td>
					</tr>
					<tr>
						<td>followId</td>
						<td><input name="followId"  /></td>
						<td>粉丝的followId</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":删除的粉丝Id,"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>													-->

					
																
															</div><!-- #accordion -->
														</div><!-- ./span -->
													</div>
												</div>

												<div id="section2" class="tab-pane fade">
													<div class="alert alert-info">
														<button type="button" class="close" data-dismiss="alert">
															<i class="ace-icon fa fa-times"></i>
														</button>
														<strong>加油!</strong>
														开发中......
														<br>
													</div>
												</div>


												<div id="section3" class="tab-pane fade">
													<div class="row">
														<div class="col-sm-12">
															<div class="accordion accordion-style2">
	
<div class="group">
	<h3 class="accordion-header">得到轮播图</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/news/sliders</span></td>
					</tr>
					<tr>
						<td>category</td>
						<td><input name="category"  /></td>
						<td>类别category。  1：首页，2：列表</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"轮播图列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>	

<div class="group">
	<h3 class="accordion-header">得到所有的论坛类别</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/allcategory</span></td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"类别列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>	

<div class="group">
	<h3 class="accordion-header">通过类别得到论坛列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsentityListByCategoryId</span></td>
					</tr>
					<tr>
						<td>categoryId</td>
						<td><input name="categoryId"  /></td>
						<td>类别ID</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">后台推荐论坛列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsentityImportantList</span></td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:0,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>


<div class="group">
	<h3 class="accordion-header">搜索论坛名称 得到论坛列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsentitySearch</span></td>
					</tr>
					<tr>
						<td>keyWord</td>
						<td><input name="keyWord"  /></td>
						<td>关键字</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:0,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">论坛标签</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsTags</span></td>
					</tr>
					<tr>
						<td>bbsId </td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:0,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">某个会员关注的论坛列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/memberBbsList</span></td>
					</tr>
					<tr>
						<td>toMemberId</td>
						<td><input name="toMemberId"  /></td>
						<td>会员ID</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1013,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">关注论坛</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/followbbs</span></td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID（t_bbs_entity 的ID）</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1103,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>
<div class="group">
	<h3 class="accordion-header">取消关注论坛</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/cancelFollowBbs</span></td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID（t_bbs_entity 的ID）</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:1104,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">论坛详情</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsDetail</span></td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID（t_bbs_entity 的ID）</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"name(名称),poster(封面图片),description(描述),topicNum(帖子数量),followCount(论坛人数),isFollow(是否关注)","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">得到帖子类别</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/topicCategorys</span></td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:0,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>


<div class="group">
	<h3 class="accordion-header">发帖</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/addTopic</span></td>
					</tr>
					<tr>
						<td>title</td>
						<td><input name="title"  /></td>
						<td>标题</td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID</td>
					</tr>
					
					<tr>
						<td>avatar</td>
						<td><input name="avatar"  /></td>
						<td>封面图片</td>
					</tr>
					
					<tr>
						<td>content</td>
						<td><input name="content"  /></td>
						<td>内容</td>
					</tr>
					<tr>
						<td>isReplay</td>
						<td><input name="isReplay"  /></td>
						<td>是否可以回复</td>
					</tr>
					<tr>
						<td>categoryId</td>
						<td><input name="categoryId"  /></td>
						<td>帖子类型</td>
					</tr>
					<tr>
						<td>imgList</td>
						<td><input name="imgList"  /></td>
						<td>帖子图片列表json字符串 ： '[{"imgpath":"xxxx.jpg"},{"imgpath":"xxxx.jpg"}]'</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">得到置顶帖子列表</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsTopTopics</span></td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID</td>
					</tr>
					<tr>
						<td>gn</td>
						<td><input name="gn"  /></td>
						<td>全局置顶帖子的数量</td>
					</tr>
					
					<tr>
						<td>bn</td>
						<td><input name="bn"  /></td>
						<td>论坛顶帖子的数量</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":{'globalTopList(全局置顶列表)':[...],'bbsTopList(论坛置顶列表)':[...]},"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">得到首页的帖子列表（根据用户的关注属性得到帖子的列表）</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/memberTopics</span></td>
					</tr>
					<tr>
						<td>pageNum</td>
						<td><input name="pageNum"  /></td>
						<td>页码（默认1）</td>
					</tr>
					<tr>
						<td>limit</td>
						<td><input name="limit"  /></td>
						<td>每页数量（默认10）</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"论坛列表","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">得到帖子列表 (某一个论坛下面的帖子列表，按照最近回复时间来排序)</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/bbsTopics</span></td>
					</tr>
					<tr>
						<td>bbsId</td>
						<td><input name="bbsId"  /></td>
						<td>论坛ID</td>
					</tr>
					<tr>
						<td>pageNum</td>
						<td><input name="pageNum"  /></td>
						<td>页码（默认1）</td>
					</tr>
					<tr>
						<td>limit</td>
						<td><input name="limit"  /></td>
						<td>每页数量（默认10）</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"帖子列表","code":200,"msg":"ok"}<br>
						topicId:帖子ID,"categoryName":"论坛类别","bbsId":论坛ID,"bbsName":"论坛名称","memberId":会员ID,"realName":"会员名称","memberAvatar":"会员偷像","pregnancyTime":会员怀孕时间,"topicTitle":"帖子标题","topicAvatar":"","isBest":是否是精华帖,"lastReplyTime":"最近回复时间","likeNum":点赞数量,"clickNum":点击数量,"replayNum":回复数量,"topicContent":"内容前面30个字符","createTime":"创建时间戳","imgList":关联图片列表
						</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>

<div class="group">
	<h3 class="accordion-header">得到一个帖子详情</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/bbsnurse/topicDetail</span></td>
					</tr>
					<tr>
						<td>topicId</td>
						<td><input name="topicId"  /></td>
						<td>帖子ID</td>
					</tr>
					
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":{"topic":帖子详情,"member":发帖用户信息},"code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,content:"",code:-1,msg:"失败原因"}</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnTextApi btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>




															</div>
														</div>
													</div>
												</div>

												<div id="section4" class="tab-pane fade">
													<div class="alert alert-info">
														<button type="button" class="close" data-dismiss="alert">
															<i class="ace-icon fa fa-times"></i>
														</button>
														<strong>加油!</strong>
														开发中......
														<br>
													</div>
												</div>

												<div id="section5" class="tab-pane fade">
													<div class="alert alert-info">
														<button type="button" class="close" data-dismiss="alert">
															<i class="ace-icon fa fa-times"></i>
														</button>
														<strong>加油!</strong>
														开发中......
														<br>
													</div>
												</div>
												
												<div id="section6" class="tab-pane fade">
													<div class="row">
														<div class="col-sm-12">
															<div class="accordion accordion-style2">
<div class="group">
	<h3 class="accordion-header">单图片上传接口</h3>
	<div>
		<div class="row">
			<div class="col-sm-12">
				<form id="form1" method="post" action="{:url('home/index/getData', '', '')}" class="form-horizontal">
				<table id="simple-table" class="table table-bordered table-hover">
					<tr>
						<td>url</td>
						<td colspan="2"><span class="url">/api/appfile/uploadonefile</span></td>
					</tr>
					<tr>
						<td>file</td>
						<td><input type="file" name="uploadFile"  /></td>
						<td>选择文件</td>
					</tr>
					<tr>
						<td>compress</td>
						<td><input class="compress" name="compress"  /></td>
						<td>是否压缩(0:不压缩,1:压缩)  如果压缩的话，系统会自动吧图片自适应压缩到1000*1000以内的尺寸，并且转成jpg，让其适用于移动端浏览。如果上传的文件需要有透明背景的PNG格式，就不要压缩</td>
					</tr>
					<tr>
						<td>请求成功</td>
						<td colspan="2">{"success":1,"content":"图片相对路径","code":200,"msg":"ok"}</td>
					</tr>
					<tr>
						<td>请求失败</td>
						<td colspan="2">{"success":0,msg:"错误信息",content:"",code:错误代码}</td>
					</tr>
				</table>
				</form>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<button class="btnUploadOneFile btn btn-primary btn-mini">测试提交</button>
			</div>
			<div class="col-sm-12"><span class="postURL"></span></div>
		</div>
		<div class="space-2"></div>
		<div class="row">
			<div class="col-sm-12">
				<textarea  ></textarea>
			</div>
		</div>
	</div>
</div>


															</div>
														</div>
													</div>
												</div>
												
												
												<div id="section7" class="tab-pane fade">
													<img src="img/database.png" />
												</div>
												
												
											</div>
										</div>

									</div><!-- /.col -->

					</div><!-- /.row -->
                </div>
            </div>
            <!-- /.main-content -->
        </div>
        <!-- /.main-container -->
    </div>
    <script type="text/javascript">

var vipcardLayer;
$(function() { 
	$(".btnTextApi").click(function(){
		$(this).attr("disabled","disabled");	
		  
		var $curNode = $(this);
		var inputToken 		= $("#inputToken").val();
		var inputMemberId 	= $("#inputMemberId").val();
		var $container 		= $curNode.parent().parent().parent();
		var $inputList 		= $container.find("input");
		var $resultArea 		= $container.find("textarea");
		var $actionName 		= $container.find(".url").html();
		var $postURL 		= $container.find(".postURL");
		var completeURL 		= $("#website").val()+""+$actionName+""+$("#signStr").val()+"userToken="+inputToken+"&memberId="+inputMemberId;
		
		completeURL = completeURL.replace(/&/g, "& ");
		
		$postURL.html(completeURL);
		
		var jsonObj = {};
		$inputList.each(function(){
			var name = $(this).attr("name");
			var val = $(this).val();
			jsonObj[name] = val;
		});
		
		$resultArea.val(""); 
		$.ajax({
			url:completeURL,
			type:"POST",
			dataType: "json",
			data: jsonObj,
			success: function (result) {
				if(result.userToken!=null){
					var token = result.userToken.token;
					var memberId = result.userToken.memberId;
					var expireTime = result.userToken.expireTime;
					$("#tokenLabel").html("token:"+token+"  memberId:"+memberId+" expireTime:"+expireTime);
					$("#inputToken").val(token);
					$("#inputMemberId").val(memberId);
				}
				$resultArea.val(JSON.stringify(result));
				$curNode.removeAttr("disabled");
			},             
			error: function (XMLHttpRequest, textStatus, errorThrown) {     
				
				$resultArea.val("网络异常 \r\n"+textStatus+"  \r\n"+XMLHttpRequest.responseText);   
				$curNode.removeAttr("disabled");
			}
		});
	});
	
	
	
	$(".btnUploadOneFile").click(function(){
		$(this).attr("disabled","disabled");	
		
		var compress = $("input[name='compress']").val();
		
		var $curNode = $(this);
		
		var inputToken 		= $("#inputToken").val();
		var inputMemberId 	= $("#inputMemberId").val();
		var $container 		= $curNode.parent().parent().parent();
		var $inputList 		= $container.find("input");
		var $resultArea 		= $container.find("textarea");
		
		$('#form1').ajaxSubmit({
			dataType : "json",
			data:{compress:compress},
			success:function(data){
				$resultArea.val(JSON.stringify(data));
				$curNode.removeAttr("disabled");
			},
			error: function (XMLHttpRequest, textStatus, errorThrown) {  
				$resultArea.val("网络异常 \r\n"+textStatus+"  \r\n"+XMLHttpRequest.responseText);   
				$curNode.removeAttr("disabled");
			}
		});
	});
	
	$(".userpassword").blur(function(){
		if($(this).val().length>20){
			return;
		}
		var md5str = md5($(this).val());
		$(this).val(md5str);
	});
	
	//jquery accordion
	$( ".accordion" ).accordion({
		collapsible: true ,
		heightStyle: "content",
		animate: 250,
		header: ".accordion-header"
	}).sortable({
		axis: "y",
		handle: ".accordion-header",
		stop: function( event, ui ) {
			// IE doesn't register the blur when sorting
			// so trigger focusout handlers to remove .ui-state-focus
			ui.item.children( ".accordion-header" ).triggerHandler( "focusout" );
		}
	});
	
	$( "#tabs" ).tabs();
	
});
    </script>

{include file="common/footer" /}